using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class ProductGroup
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private string _GroupCode;

		public string GroupCode
		{
			get { return _GroupCode; }
			set { _GroupCode = value; }
		}

		private string _GroupName;

		public string GroupName
		{
			get { return _GroupName; }
			set { _GroupName = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		private string _Note;

		public string Note
		{
			get { return _Note; }
			set { _Note = value; }
		}

		public ProductGroup()
		{ }

		public ProductGroup(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,string GroupCode,string GroupName,int? AccountId,string Note)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.GroupCode = GroupCode;
			this.GroupName = GroupName;
			this.AccountId = AccountId;
			this.Note = Note;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",GroupCode = " + GroupCode + ",GroupName = " + GroupName + ",AccountId = " + AccountId.ToString() + ",Note = " + Note;
		}

		public class IDComparer : System.Collections.Generic.IComparer<ProductGroup>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<ProductGroup> Membres
			int System.Collections.Generic.IComparer<ProductGroup>.Compare(ProductGroup x, ProductGroup y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class GroupCodeComparer : System.Collections.Generic.IComparer<ProductGroup>
		{
			public SorterMode SorterMode;
			public GroupCodeComparer()
			{ }
			public GroupCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<ProductGroup> Membres
			int System.Collections.Generic.IComparer<ProductGroup>.Compare(ProductGroup x, ProductGroup y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.GroupCode.CompareTo(x.GroupCode);
				}
				else
				{
					return x.GroupCode.CompareTo(y.GroupCode);
				}
			}
			#endregion
		}
		public class GroupNameComparer : System.Collections.Generic.IComparer<ProductGroup>
		{
			public SorterMode SorterMode;
			public GroupNameComparer()
			{ }
			public GroupNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<ProductGroup> Membres
			int System.Collections.Generic.IComparer<ProductGroup>.Compare(ProductGroup x, ProductGroup y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.GroupName.CompareTo(x.GroupName);
				}
				else
				{
					return x.GroupName.CompareTo(y.GroupName);
				}
			}
			#endregion
		}
		public class NoteComparer : System.Collections.Generic.IComparer<ProductGroup>
		{
			public SorterMode SorterMode;
			public NoteComparer()
			{ }
			public NoteComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<ProductGroup> Membres
			int System.Collections.Generic.IComparer<ProductGroup>.Compare(ProductGroup x, ProductGroup y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Note.CompareTo(x.Note);
				}
				else
				{
					return x.Note.CompareTo(y.Note);
				}
			}
			#endregion
		}
	}
}
